<?php
namespace app\admin\model;

use \think\Model as Model;
class BookType extends Model{
    protected $table = "edu_book_type";
    protected $pk = 'bt_id';

    public function remove(){
        if($this->req->has('id')){
            $id = $this->req->get('id');
            $data = $this->where(['bt_fid'=>$id])->select();
            if(empty($data)){
                return 0;
            }else{
                $this->destory(['bt_id'=>$id]);
                return 1;
            }
        }
    }
}
